data-manipulation/hashing/djb2

hash data using djb2

rule:
  meta:
    name: hash data using djb2
    namespace: data-manipulation/hashing/djb2
    authors:
      - awillia2@cisco.com
      - still@teamt5.org
    scopes:
      static: function
      dynamic: unsupported  # requires mnemonic features
    mbc:
      - Data::Non-Cryptographic Hash::djb2 [C0030.006]
    references:
      - https://twitter.com/r3c0nst/status/1392405576131436546
      - http://www.cse.yorku.ca/~oz/hash.html
    examples:
      - 6be0ae5cb7c3155f70d608fc7670d2d9:0x41DD19
  features:
    - and:
      - instruction:
        - description: hash = 5381
        - mnemonic: mov
        - number: 5381
      - or:
        - instruction:
          - description: hash << 5
          - mnemonic: shl
          - number: 5
        - instruction:
          - description: hash * 33
          - or:
            - mnemonic: mul
            - mnemonic: imul
          - number: 33

last edited: 2023-11-24 10:34:28